import { defineComponent, ref, watch } from "vue";
import './style.scss'

export default defineComponent({
  name: 'YunHeader',
  props: {
    value: {
      type: String,
      default: ''
    }
  },
  emits: ['update:value'],
  setup(props, { emit }) {
    const value = ref('')
    watch(() => value.value, () => {
      emit('update:value', value.value)
    })
    return () => (
      <div className="yun-header">
        <span
          className="iconfont menu"
        >
          &#xe65c;
        </span>
        {/* <input type="text" value={props.value} onChange={e => value.value = e.target.value} /> */}
        <span className="title">云音悦</span>
        <span
          className="iconfont search"
        >
          &#xe62b;
        </span>
      </div>
    )
  }
})